package com.cw.subject.common.enums;

import lombok.Getter;

/**
 * @author: 江传文
 * @date: 2024/4/7 21:25
 * 分类类型枚举
 */
@Getter
public enum CateGoryTypeEnum {
    PRIMARY(1, "岗位大类"),
    SECOND(2, "二级分类");

    public final int code;
    public final String desc;

    CateGoryTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static CateGoryTypeEnum getByCode(int codeVal){
        for(CateGoryTypeEnum cateGoryTypeEnum : CateGoryTypeEnum.values()){
            if(cateGoryTypeEnum.code == codeVal){
                return cateGoryTypeEnum;
            }
        }
        return null;
    }
}
